package com.example.zhinongbao.presentertest;




/**
 * Class representing an item with a title and its corresponding pinyin title.
 */
public class TitleInfo {
    private String title;
    private String pyTitle;

    /**
     * Constructs a new TitleInfo with the specified title and pinyin title.
     *
     * @param title    The title of the item.
     * @param pyTitle  The pinyin representation of the title.
     */
    public TitleInfo(String title, String pyTitle) {
        this.title = title;
        this.pyTitle = pyTitle;
    }

    /**
     * Gets the title of the item.
     *
     * @return The title.
     */
    public String getTitle() {
        return title;
    }

    /**
     * Sets the title of the item.
     *
     * @param title The new title.
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Gets the pinyin title of the item.
     *
     * @return The pinyin title.
     */
    public String getPyTitle() {
        return pyTitle;
    }

    /**
     * Sets the pinyin title of the item.
     *
     * @param pyTitle The new pinyin title.
     */
    public void setPyTitle(String pyTitle) {
        this.pyTitle = pyTitle;
    }

    @Override
    public String toString() {
        return "TitleInfo{" +
                "title='" + title + '\'' +
                ", pyTitle='" + pyTitle + '\'' +
                '}';
    }
}